import time
from selenium import webdriver
from selenium.webdriver.common.by import By
driver = webdriver.Edge()
driver.get("http://121.43.169.97:8848/pageA.html")
driver.maximize_window()
time.sleep(1)
#   定位元素并进行输入
driver.find_element(By.CSS_SELECTOR, "#userA").send_keys("admin")
driver.find_element(By.CSS_SELECTOR, "[name='passwordA']").send_keys("123456")
driver.find_element(By.XPATH, "//input[@name='telA']").send_keys("18611111111")
driver.find_element(By.XPATH, "//input[@name='emailA']").send_keys("123@qq.com")
time.sleep(3)
#   定位元素并进行清空输入框
driver.find_element(By.XPATH, "//input[@name='telA']").clear()
#   定位元素并进行输入
driver.find_element(By.XPATH, "//input[@name='telA']").send_keys("18600000000")
time.sleep(3)
#   定位元素并进行点击
driver.find_element(By.XPATH, value="/html/body/div/fieldset/form/p[5]/button").click()
time.sleep(3)
driver.quit()





